package com.mini.cn.goods.servlet.ws.service.impl;

import com.mini.cn.goods.io.netty.ws.WebSocketSession;
import com.mini.cn.goods.io.netty.ws.info.FastPushMsg;
import com.mini.cn.goods.servlet.ws.service.IPushResultCallback;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * 零售网金平台架构部网关组
 * User: fly
 * Date: 2020-02-22
 * Time: 5:00 下午
 */
@Slf4j
@Service
public class PushResultHandle implements IPushResultCallback {

    @Override
    public void onSuccessSend(WebSocketSession session, FastPushMsg message) {
        log.info("onSuccessSend ...:"+message.getMsgId());
    }

    @Override
    public void onFailSend(WebSocketSession session, FastPushMsg message, Throwable throwable) {
        session.close();
    }
}
